//shoot a bullet when press shoot button
var inst;
if(keyboard_check_pressed(global.shootbutton)){
    if(instance_number(bullet)<4){
        inst = instance_create(x+2*xScale,y-2*yflag,bullet);
        inst.hspeed = xScale*16;
        audio_playsound(sndShoot);
    }
}
